<?php
class BaseFormAdmin extends sfForm{
	public function configure(){
		sfContext::getInstance()->getConfiguration()->loadHelpers('I18N');
		$this->addEnable();
		
	}
	/*
	 * Enable to show on website
	 */
	private function addEnable(){
		$enables = AdminArrayData::getEnabled();
		foreach($enables as $key =>$val){
			$enables[$key]	= __($val, null, 'table_list');
		}
		$this->setWidget('is_enabled', new sfWidgetFormChoice(array('choices'=>$enables,'expanded'=>true)));
		$this->setValidator('is_enabled', new sfValidatorChoice(array('choices'=>array_keys($enables))));
		$this->setDefault('is_enabled', '1');
	}
}
